home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / COSEmulator / COSEmulator- SRC / headers / MenuBar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-21  |  1.1 KB  |  58 lines  |  [TEXT/CWIE]

  1. #ifndef _MenuBar_h_
  2. #define _MenuBar_h_
  3.  
  4. #include "Blitters.h"
  5. #include "MenuItem.h"
  6.  
  7. // location of stuff on screen
  8. #define    kMaxMenuBarItems    10
  9.  
  10. #define    kAppleMenu        0
  11. #define    kProgramList    9
  12.  
  13. class    MenuBar
  14. {
  15. public:
  16.     MenuBar( void );
  17.  
  18.     Boolean    Init( void );
  19.     
  20.     Boolean    HandleMouseClick( Boolean down , point where );
  21.     void    HandleMouseMove( point where );
  22.     void    UpdateMenuBar( rect *where );
  23.  
  24. // this is for the menus
  25.     void    ClearMenuList( void );
  26.     void    AddMenuToList( MenuItem *item );
  27.     void    AddAppToList( uchar app );
  28.     
  29. // used to draw to the menu bar    
  30.     void    DrawGeneric(     OffScreenBuff *srcBuff , rect *srcRect , 
  31.                                 rect *destRect , rect *crop , ushort options , 
  32.                                 uchar more , ushort color );
  33.  
  34. // other stuff
  35.     void    HandleSpecialMenuSelect( uchar which , uchar select );
  36.     void    SetUpSpecialMenu( MenuItem *appleMenu , MenuItem *appSwitchMenu );
  37. private:
  38.     
  39.     void    DrawAllList( rect *where );
  40.     
  41.     Boolean        activeSelect;
  42.     Boolean        menuDown;
  43.     uchar        which;
  44.     
  45.     MenuItem    *menus[ kMaxMenuItems ];
  46.     uchar        numMenu;                        // how many menues are in use
  47.     
  48.     rect        menuBarLoc;
  49.     
  50.     OffScreenBuff    backGround;
  51.     OffScreenBuff    menuBar;
  52.  
  53. };
  54.  
  55. extern    MenuBar    menuBar;
  56.  
  57.  
  58. #endif